package com.itheima.domain.db;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

//冻结
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Freeze implements Serializable {
    private Long id;//id
    private Long userId;//用户id
    private Integer userStatus;//1：正常，2：冻结状态
    private Integer freezingTime;//冻结时间，1为冻结3天，2为冻结7天，3为永久冻结
    private Integer freezingRange;//冻结范围，1为冻结登录，2为冻结发言，3为冻结发布动态
    private String reasonsForFreezing;//冻结原因
    private String frozenRemarks;//冻结备注

    private Date startTime;//冻结开始时间

    private String reasonsForThawing;//解冻备注
    private Date finishTime;//解冻时间


    public Freeze setFreeze(Freeze freeze) {
        this.userStatus=2;
        this.startTime=freeze.getStartTime();
        this.finishTime=freeze.getFinishTime();
        this.freezingTime=freeze.getFreezingTime();
        this.freezingRange=freeze.getFreezingRange();
        this.reasonsForFreezing=freeze.getReasonsForFreezing();
        this.frozenRemarks=freeze.getFrozenRemarks();
        return freeze;
    }
}
